package br.indt.framework.ui.common;

import javax.microedition.lcdui.Graphics;

public class PopUpItemFullTouch extends PopUpItem {
	public PopUpItemFullTouch() {
		super();
	}

	public void paint(Graphics g, int x, int y, int maxWidth, int maxHeight) {
		g.setColor(0x747577);

		g.setClip(5, 86, 230, 228);
		g.fillRoundRect(5, 86, 230, 228, 4, 4);

		g.setColor(0xb9b9b9);
		g.fillRoundRect(7, 126, 226, 186, 0, 0);

		int _type_icon = POS_ICON_SUCCESS;
		String str_note = null;

		if (getType() == PopUpScreen.ERRO) {
			_type_icon = POS_ICON_ERRO;
			str_note = "ERROR_NOTE";

		} else if (getType() == PopUpScreen.ALERT) {
			_type_icon = POS_ICON_ALERT;
			str_note = "ALERT_NOTE";

		} else if (getType() == PopUpScreen.SUCCESS) {
			_type_icon = POS_ICON_SUCCESS;
			str_note = "SUCCESS_NOTE";
		}

		lbTitle.setTextColor(0xe6e6e6);
		lbTitle.setText(str_note);
		lbTitle.paint(g, 15, 96, maxWidth, maxHeight);

		g.setClip(5, 86, 230, 228);
		g.setColor(0x3d3d3d);

		lbNote.setText(getNote());
		lbNote.paint(g, x, y+87, maxWidth, maxHeight);

		g.setClip(ICON_X, ICON_Y, ICON_H, ICON_W);
		g.drawImage(icons, ICON_X-_type_icon, ICON_Y, Graphics.TOP | Graphics.LEFT);
	}
}